/**
 * 滑动滚动条
 * @param {*} slidingDistance 滑动的距离，没有传入，默认滑动到底部
 * @param {*} behavior 滚动方式
 */
const $ = require('jquery')
export default function(slidingDistance,behavior){
  const dom = document.getElementById("home_con");
  const sTop = slidingDistance || slidingDistance === 0 ? slidingDistance : dom.scrollHeight;
  if (behavior === 'smooth') {
    $(dom).animate({scrollTop: sTop},300);
  }else {
    dom.scrollTo({
      top: sTop,
      left: 0,
      behavior: behavior
    });
  }
}
